/**
 * 
 */
package com.feib.stms.dao.jdbc.rowmapper;

import java.sql.ResultSet;

import org.springframework.jdbc.core.RowMapper;

import com.feib.stms.model.ConfirmRule;
import com.feib.stms.model.Group;


/**
 * @author Jeff Gu
 *
 */

public class ConfirmRuleRowMappper extends BaseRowMapper<ConfirmRule> implements RowMapper<ConfirmRule>{


	private static final long serialVersionUID = -1498733134221728471L;


	public ConfirmRuleRowMappper() {
		super(ConfirmRule.class);		
	}


	@Override
	protected ConfirmRule doOtherMapRow(ResultSet rs, int rowNumber, ConfirmRule entity )
	{
		entity.setEnabled(getColumnBoolean(rs, "IS_ENABLED"));
		
		Group group = new Group();
		entity.setGroup(group);

		group.setGroupNo((String)getColumnValue(rs, "GROUP_NO", String.class));
		group.setGroupPk((Long)getColumnValue(rs, "GROUP_PK", Long.class));
		group.setGroupName((String)getColumnValue(rs, "GROUP_NAME", String.class));



		return entity;

	}


}
